<extend name="Base/common1"/>

<block name="header">
    <header class="jumbotron subhead" id="overview">
        <div class="container">
            <div class="title">
                 <h1><a href="#"> Physical examination results query 体检结果查询 </a></h1>
            </div>
        </div>
    </header>
</block>

<block name="body">
    <div class="container">
        <div class='col-sm-6'>
            <div class="form-group">
                <div class="form-item cf">
                    <div class="controls">
                        <span>体检时间: &nbsp;&nbsp;&nbsp;&nbsp;</span><input id="querydate1" type="text" name="create_time1" class="text date" value="{$tjrq1}" placeholder="请选择日期" />
                        <input id="querydate2" type="text" name="create_time2" class="text date" value="{$tjrq2}" placeholder="请选择日期" />
                        <span>姓名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <input id="queryxm" type="text" name="create_time3" class="text" value="" placeholder="请输入姓名" />
                        <button id="querybutton" type="button" class="btn btn-primary">查询</button>
                        <button id="exportbutton" type="button" class="btn btn-primary">导出</button>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $('.date').datetimepicker({format: 'yyyy-mm-dd',language:"zh-CN",minView:2,autoclose:true});
                $("#querybutton").click(function(){
                    var querydate1 = document.getElementById("querydate1");
                    var querydate2 = document.getElementById("querydate2");
                    var xm = document.getElementById("queryxm");
                    if (xm.value==''){
                        window.location.href="/index.php?s=/Home/Examine&tjrq1="+querydate1.value+"&tjrq2="+querydate2.value;
                    } else {
                        window.location.href="/index.php?s=/Home/Examine&xm="+xm.value;
                    }
                    //alert("test");
                    // $(this).button('reset');
                });
                $("#exportbutton").click(function(){
                    var querydate1 = document.getElementById("querydate1");
                    var querydate2 = document.getElementById("querydate2");
                    window.location.href="/index.php?s=/Home/Examine/export&tjrq1="+querydate1.value+"&tjrq2="+querydate2.value;
                    //alert("test");
                    // $(this).button('reset');
                });

            });
        </script>
    </div>
    <script type="text/javascript" src="/Public/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="/Public/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <table class="table table-bordered">
        <thead>
        <tr>
            <th width="5%">体检日期</th>
            <th width="4%">姓名</th>
            <th width="7%">身份证号</th>
            <th width="10%">工作单位</th>
            <th width="3%">一般</th>
            <th width="3%">内科</th>
            <th width="3%">外科</th>
            <th width="3%">胸透</th>
            <th width="4%">心电图</th>
            <th width="3%">化验</th>
            <th width="3%">妇科</th>
            <th width="5%">体检结果</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="data" empty="暂时没有数据">
            <tr>
                <td>{$data.tjrq}</td>
                <td>{$data.xm}</td>
                <td>{$data.sfzh}</td>
                <td>{$data.address}</td>
                <td>{$data.keshi1}</td>
                <td>{$data.keshi2}</td>
                <td>{$data.keshi3}</td>
                <td>{$data.keshi4}</td>
                <td>{$data.keshi5}</td>
                <td>{$data.keshi6}</td>
                <td>{$data.keshi7}</td>
                <td><empty name="data.note">未出结果<else />{$data.note}</empty></td>
            </tr>
        </volist>

        </tbody>
    </table>
</block>